﻿<%@ Page Title="" Language="C#" MasterPageFile="~/dormitoryAdministrator/dormitoryAdministrator.Master" AutoEventWireup="true" CodeBehind="StudentStayManagement.aspx.cs" Inherits="WebApplication1.dormitoryAdministrator.StudentStayManagement" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="position:relative;top:5px;left:10px">
    <asp:Label ID="susername" runat="server" Text="宿舍号："></asp:Label>
    <asp:TextBox ID="selectName" runat="server" Width="88px"></asp:TextBox>
    <asp:Button ID="select" runat="server" Text="查询"  OnClick="s_Click"/>
     <asp:Button ID="selectAll" runat="server" Text="查询全部"   OnClick="selectAll_Click"  />
       </div>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" PageSize="3" OnPageIndexChanging="GridView1_PageIndexChanging" DataKeyNames="id" CellPadding="4" CellSpacing="10" Width="100%" ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
        <Columns>
             <asp:TemplateField HeaderText="id" Visible="false">                       
                    <ItemTemplate>
                        <asp:Label ID="id" runat="server" Text='<%#Bind("id") %>' />
                    </ItemTemplate>                                 
                </asp:TemplateField>
            <asp:TemplateField HeaderText ="序号" InsertVisible="False">
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderStyle HorizontalAlign="Center" Width="5%" />
                     <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# this.GridView1.PageIndex * this.GridView1.PageSize + this.GridView1.Rows.Count + 1%>'/>
                    </ItemTemplate>
                </asp:TemplateField>
             <%--宿舍楼--%>
                 <asp:TemplateField HeaderText="宿舍楼">                       
                    <ItemTemplate>
                        <asp:Label ID="hostel" runat="server" Text='<%#Bind("hostelName") %>' />
                    </ItemTemplate>                                 
                </asp:TemplateField>

                  <%-- 宿舍号--%>
                <asp:TemplateField HeaderText="宿舍号">
                     <ItemTemplate>
                        <asp:Label ID="dormitory" runat="server" Text='<%#Bind("name") %>' />                        
                    </ItemTemplate>
                </asp:TemplateField>

                  <%-- 入住学生 --%>
                <asp:TemplateField HeaderText="入住学生">
                     
                    <ItemTemplate>
                        <asp:BulletedList ID="BulletedList1" runat="server" BulletStyle="CustomImage" RepeatDirection="Horizontal"  DataSource='<% #Bind("studentNames") %>' ></asp:BulletedList>
                            
                    </ItemTemplate>
                 </asp:TemplateField>
        </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
</asp:Content>
